<%@ taglib uri="/WEB-INF/myfaces_html.tld" 	prefix="h" %>
<%@ taglib uri="/WEB-INF/myfaces_core.tld" 	prefix="f" %>
<%@ taglib uri="/WEB-INF/tomahawk.tld"     	prefix="t" %>
<%@ taglib uri="/WEB-INF/myfaces_sandbox.tld"   prefix="s" %>

<f:view>    
    <jsp:include page="/intestazione.jsp">
        <jsp:param name="titolo" value="Gestione Prodotti Dettaglio"/>
    </jsp:include>
    <jsp:include page="/menu.jsp"/>
    <script language="javascript" src="./script/ripristinoSessione.js"></script>
    <br />
    <table class="dataTableGestisci_Table" style="border: 2pt solid white; margin-bottom: -15px;" align="center">
        <hr />
        <tr>  
            <td class="intestazionePagina" align="center">
            <strong>Esito Ricerca Articoli</strong></td>                        
        </tr>        
    </table>
    
    <h:panelGrid styleClass="navigazione_Table"/>        
    <h:form id="erroriDataBase" rendered="false">
        <f:verbatim><table><td align="left" class="messaggiErrore" height="2px"></f:verbatim>           
        <h:messages style="color: red" showDetail="true" showSummary="false"/>
        <f:verbatim></td></table></f:verbatim>
    </h:form>  
    <f:verbatim><br/></f:verbatim>
    
    <h:form>
        <t:panelTab id="tab1" label="Prodotti Dettaglio">
           
            <t:dataTable id="gestisciProdottoDett" var="lista" value="#{dettaglioRicercaProdotto.listaProdotti}" preserveDataModel="true"           
                styleClass="dataTableGestisci_Table" 
                headerClass="dataTableGestisci_Header"
                rowClasses="dataTableGestisci_Row1, dataTableGestisci_Row2"          
                columnClasses="dataTableGestisci_Column" 
                rowOnMouseOver="this.style.backgroundColor='orange'"
                rowOnMouseOut="this.style.backgroundColor=''">  
                 
                <t:column width="5%">
                    <f:facet name="header"  >
                        <t:outputText value="Codice" />
                    </f:facet>
                    <t:outputText value="#{lista.codice}" /> 
                </t:column>
                        
                <t:column width="12%">
                    <f:facet name="header"  >
                        <t:outputText value="Reparto/Famiglia" />
                    </f:facet>
                    <t:outputText value="Rep: #{lista.beanProdotto.beanReparto.codice} :: Fam: #{lista.beanProdotto.descrizione}" /> 
                </t:column>  

                <t:column width="18%">
                    <f:facet name="header"  >
                        <t:outputText value="Descrizione Breve" />
                    </f:facet>
                    <t:outputText value="#{lista.descrizioneBreve}" /> 
                </t:column>             
                
                <t:column width="15%">
                    <f:facet name="header"  >
                        <t:outputText value="Fornitore" />
                    </f:facet>
                    <t:outputText value="#{lista.beanFornitore.ragioneSociale}" /> 
                </t:column>  
                
                <t:column width="8%" style="text-align: right">                        
                    <f:facet name="header">
                        <t:outputText value="Prezzo Acquisto"/>
                    </f:facet>                        
                    <t:outputText value="#{lista.prezzoAcquisto}">
                        <s:convertNumber minIntegerDigits="1" maxFractionDigits="2" pattern="0.00"/>
                    </t:outputText>              
                </t:column>
                
                <t:column width="5%" style="text-align: right">                        
                    <f:facet name="header">
                        <t:outputText value="Prezzo Vendita"/>
                    </f:facet>                        
                    <t:outputText value="#{lista.prezzoVendita}">
                        <s:convertNumber minIntegerDigits="1" maxFractionDigits="2" pattern="0.00"/>
                    </t:outputText>              
                </t:column>
                
                <t:column width="4%" style="text-align: right">                        
                    <f:facet name="header">
                        <t:outputText value="#{login.listino1}"/>
                    </f:facet>                        
                    <t:outputText value="#{lista.listino1}">
                        <s:convertNumber minIntegerDigits="1" maxFractionDigits="2" pattern="0.00"/>
                    </t:outputText>              
                </t:column>
                
                <t:column width="4%" style="text-align: right">                        
                    <f:facet name="header">
                        <t:outputText value="#{login.listino2}"/>
                    </f:facet>                        
                    <t:outputText value="#{lista.listino2}">
                        <s:convertNumber minIntegerDigits="1" maxFractionDigits="2" pattern="0.00"/>
                    </t:outputText>              
                </t:column>
                    
                <t:column width="4%" style="text-align: right">                        
                    <f:facet name="header">
                        <t:outputText value="#{login.listino3}"/>
                    </f:facet>                        
                    <t:outputText value="#{lista.listino3}">
                        <s:convertNumber minIntegerDigits="1" maxFractionDigits="2" pattern="0.00"/>
                    </t:outputText>              
                </t:column>
                
                <t:column width="4%" style="text-align: right">                        
                    <f:facet name="header">
                        <t:outputText value="#{login.listino4}"/>
                    </f:facet>                        
                    <t:outputText value="#{lista.listino4}">
                        <s:convertNumber minIntegerDigits="1" maxFractionDigits="2" pattern="0.00"/>
                    </t:outputText>              
                </t:column>
                
                <t:column width="4%" style="text-align: right">                        
                    <f:facet name="header">
                        <t:outputText value="#{login.listino5}"/>
                    </f:facet>                        
                    <t:outputText value="#{lista.listino5}">
                        <s:convertNumber minIntegerDigits="1" maxFractionDigits="2" pattern="0.00"/>
                    </t:outputText>              
                </t:column>
                
                <t:column width="5%" style="text-align: right">
                    <f:facet name="header"  >
                        <t:outputText value="Scorta" />
                    </f:facet>
                    <t:outputText value="#{lista.scorta}"> 
                        <s:convertNumber minIntegerDigits="1" maxFractionDigits="2" pattern="0.00"/>
                    </t:outputText>              
                </t:column>                  
                
                <t:column width="5%" style="text-align: right">
                    <f:facet name="header"  >
                        <t:outputText value="Reparto" />
                    </f:facet>
                    <t:outputText value="#{lista.reparto}" /> 
                </t:column>  
                
                <t:column width="5%" style="text-align: right">
                    <f:facet name="header"  >
                        <t:outputText value="Scaffale" />
                    </f:facet>
                    <t:outputText value="#{lista.scaffale}" /> 
                </t:column>  
                
                <t:column width="2%" headerstyleClass="dataTableGestisci_Header_Trasparent">
                    <f:facet name="header">
                        <t:outputText value=""/>
                    </f:facet>
                    <h:commandLink dir="RTL" title="Carica Dettaglio Prodotto" action="#{dettaglioRicercaProdotto.caricaOggetto}">
                        <t:graphicImage url="/image/visualizza.png" border="0"/>
                        <f:param name="idBean" value="#{lista.id}" />
                    </h:commandLink>
                </t:column>
                
            </t:dataTable>   
            <f:verbatim><table></f:verbatim>
            <f:verbatim><tr></f:verbatim>                
            <f:verbatim><td></f:verbatim>                
            <h:commandLink styleClass="commandLink_Style" dir="RTL" action="benvenuto" >
                <t:graphicImage url="/image/go-home.png" border="0"/>
            </h:commandLink>              
            <f:verbatim></td></f:verbatim>                
       
            <f:verbatim></tr></f:verbatim>                
            <f:verbatim></table></f:verbatim>       
        </t:panelTab>
    </h:form>
    
    <jsp:include page="/piePagina.jsp"/>    
</f:view>    